#include "ODESolver.h"
#include "ODESystem.h"
// #include "Infrastructure/BasicTools/include/SGLogger.h"

using namespace SG::Algebra;

//=============================================================================
// ODESolverBase

ODESolverBase::ODESolverBase ()
{
    mCurrentTime = 0.0;
    mFinalTime   = 1.0;
    mTimeStep    = 0.1;
}

ODESolverBase::~ODESolverBase ()
{

}

void ODESolverBase::SetTime (Real_t t)
{
    mCurrentTime = t;
}

void ODESolverBase::SetMaxTime (Real_t t)
{
    mFinalTime = t;
}

void ODESolverBase::SetTimeStep (Real_t dt)
{
    mTimeStep = dt;
}

Real_t ODESolverBase::GetTimeStep ()
{
    return mTimeStep;
}

//=============================================================================
// ODESolver

ODESolver::ODESolver ()
{

}

ODESolver::~ODESolver ()
{}

void ODESolver::Initialize (ODESystem *odes)
{
    assert (odes && "Specify the valid ODESystem object");

    mODEs = odes;
}

void ODESolver::Step (Vec_t &u)
{

}

//=============================================================================
// SecondOrderODESolver

SecondOrderODESolver::SecondOrderODESolver ()
{}

SecondOrderODESolver::~SecondOrderODESolver ()
{}

void SecondOrderODESolver::Initialize (SecondOrderODESystem *odes)
{
    assert (odes && "Specify the valid ODESystem object");

    mODEs = odes;
}

// void SecondOrderODESolver::Step (const SpMat_t &M, const SpMat_t &C, const SpMat_t &K, const Vec_t &F, Vec_t &U, Vec_t &V, Vec_t &A)
// {

// }

void SecondOrderODESolver::Step (Vec_t &u, Vec_t &v, Vec_t &a)
{
}
